<template>
	<view class="flex-col">
		<view class="title-bg flex-row-yc">
			<view @click="back" class="item-icon"><u-icon name="arrow-left" color="#fff"></u-icon></view>
			<view class="flex1 text">请假记录</view>
		</view>
		<view>
			<view class="list-item" v-for="item in dataList">
				<view class="flex-row-yc first">
					<view class="flex1">山东省机关事务管理局</view>
					<view>{{item.status}}</view>
				</view>
				<view class="flex-row-yc">
					<view>请假范围：</view>
					<view>{{item.type}}</view>
				</view>
				<view class="flex-row-yc">
					<view>请假开始时间：</view>
					<view>{{item.begintime}}</view>
				</view>
				<view class="flex-row-yc">
					<view>请假结束时间：</view>
					<view>{{item.begintime}}</view>
				</view>
				<view class="flex-row-yc">
					<view>请假原因：</view>
					<view>{{item.mark}}</view>
				</view>
				<view class="button-box flex-row">
					<view class="flex-col-c">撤销</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		DriverDayOff
	} from '../../api/leave.js';

	export default {
		data() {
			return {
				radiovalue: '',
				startTime: '',
				startTimeShow: false,
				endTime: '',
				endTimeShow: false,
				dataList: []
			}
		},
		created() {
			let param = {
				offid: 2,
				LX: 3
			}
			DriverDayOff(param).then(res => {
				let {
					code,
					data
				} = res
				this.dataList = data.table ?? []
			})
		},
		methods: {
			back() {
				uni.navigateBack({
					delta: 1
				});
			},
			groupChange() {

			}
		}
	}
</script>

<style lang="scss" scoped>
	.uni-page-body,
	html,
	body,
	.page {
		width: 100%;
		height: 100%;
		background-color: white;
	}

	.title-bg {
		width: 100%;
		padding: 0 10px;
		height: 65px;
		background: linear-gradient(-90deg, #3C88D8 0%, #7CAFE7 100%);


		.text {
			color: #FFFFFF;
			font-size: 16px;
			font-weight: 600;
			margin-left: 10px;
		}
	}

	.list-item {
		width: 100%;
		padding: 0 10px;
		border-bottom: aquamarine 1px solid;

		>view {
			height: 25px;
		}

		.first {
			border-bottom: aquamarine 1px solid;
			height: 35px;
		}

		.button-box {
			border-top: aquamarine 1px solid;
			justify-content: end;
			align-items: center;
			height: 40px;

			view {
				width: 80px;
				height: 30px;
				background: linear-gradient(-90deg, #3C88D8 0%, #7CAFE7 100%);
				color: white;
				font-size: 11px;
				margin: 0;
			}
		}
	}
</style>